﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using SIMA.Mvvm;

namespace SIMA.Client.Seguridad
{
    /// <summary>
    /// Lógica de interacción para frmIniciarSesion.xaml
    /// </summary>
    public partial class frmIniciarSesion : UserControl
    {
        MvvmPrincipal MvvmPrincipal;
        public frmIniciarSesion(MvvmPrincipal mvvmPrincipal)
        {
            InitializeComponent();
            this.MvvmPrincipal = mvvmPrincipal;
        }

        private void btnIniciarSesion_Click(object sender, RoutedEventArgs e)
        {
            MvvmPrincipal.Usuario.Id_Usuario = int.Parse(txtIdUsuario.Text);
            MvvmPrincipal.Usuario.Contraseña = txtContraseña.Password;
            MvvmPrincipal.Validate();            
        }
    }
}
